package cn.huoyingkeji.system.service.impl;

import cn.huoyingkeji.system.dto.PositionDTO;
import cn.huoyingkeji.system.entity.SysPosition;
import cn.huoyingkeji.system.mapper.SysPositionMapper;
import cn.huoyingkeji.system.service.PositionService;
import cn.hutool.core.bean.BeanUtil;
import cn.huoyingkeji.mybitisplus.service.impl.MybatisplusServiceImpl;

import org.springframework.stereotype.Service;

@Service
public class SysPositionServiceServiceImpl extends MybatisplusServiceImpl<SysPositionMapper, SysPosition, PositionDTO> implements PositionService{

    @Override
    public PositionDTO toDTO(SysPosition entity) {
        PositionDTO dto = new PositionDTO();
        BeanUtil.copyProperties(entity, dto, false);
        return dto;
    }

    @Override
    public SysPosition toEntity(PositionDTO dto) {
        SysPosition entity = new SysPosition();
        BeanUtil.copyProperties(dto, entity , false);
        return entity;
    }

    
}
